# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=pwnat
pkgver=37.cce155c
pkgrel=1
groups=('blackarch' 'blackarch-networking')
pkgdesc='A tool that allows any number of clients behind NATs to communicate with a server behind a separate NAT with *no* port forwarding and *no* DMZ setup on any routers in order to directly communicate with each other.'
arch=('x86_64' 'aarch64')
url='http://samy.pl/pwnat/'
license=('GPL')
depends=('glibc')
makedepends=('git')
source=("git+https://github.com/samyk/$pkgname.git"
        "http://samy.pl/pwnat/$pkgname.pdf")
sha512sums=('SKIP'
            'e8ffb3829d23fc25032b93ac02e93a57e89449dbcf41c00a00c98abac9be373dd0c42f8c997db591b3746d3fabfec37a2c851b158710346cb86653d39111af35')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  make
}

package() {
  cd $pkgname

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README-udptunnel README \
    Changes "$srcdir/$pkgname.pdf"
}

